#ifndef __M_CONSUMER_H__
#define __M_CONSUMER_H__
#include"../mqcommon/mq_helper.hpp"
#include"../mqcommon/mq_logger.hpp"
#include"../mqcommon/mq_msg.pb.h"
#include<string>
#include<iostream>
#include<unordered_map>
#include<memory>
#include<vector>
#include<functional>
namespace bitmq{
    using ConsumerCallBack=std::function<void(const std::string&,const bitmq::BasicProperties*bp,const std::string&)>;
    //消费者信息结构
    struct Consumer{
        using ptr=std::shared_ptr<Consumer>;
        std::string _tag;//消费者标识
        std::string _qname;//消费者订阅的队列名male
        bool _auto_ack;//是否自动应答
        ConsumerCallBack _callback;//消费者回调函数
        Consumer(const std::string&tag,const std::string& qname,bool auto_ack,const ConsumerCallBack& cb)
        :_tag(tag)
        ,_qname(qname)
        ,_auto_ack(auto_ack)
        ,_callback(std::move(cb)){}
    };
}
#endif